/** When your routing table is too long, you can split it into small modules **/

import { BasicLayout, BlankLayout } from '@/layout'

const nestedRouter = {
  path: '/life',
  component: BasicLayout,
  name: 'Life',
  redirect: '/life/album/photo',
  meta: {
    title: '生活',
    icon: 'life'
  },
  children: [{
    component: BlankLayout,
    path: 'album',
    name: 'Album',
    meta: {
      title: '影像生活',
      icon: 'life'
    },
    redirect: '/life/album/list',
    children: [
      {
        path: 'list',
        component: () => import('@/views/life/album/list'),
        name: 'AlbumList',
        meta: { title: '相簿', icon: 'album' }
      },
      {
        hidden: true,
        path: 'photo',
        component: () => import('@/views/life/photo/list'),
        name: 'Photo',
        meta: { title: '相片', icon: 'photo' }
      },
      {
        hidden: true,
        path: 'photo-add',
        component: () => import('@/views/life/photo/add'),
        name: 'PhotoAdd',
        meta: { title: '相片' }
      }

    ]
  },
  {
    component: BlankLayout,
    path: 'days',
    name: 'Days',
    meta: {
      title: '习惯',
      icon: 'life'
    },
    redirect: '/life/days/wish',
    children: [
      {
        path: 'wish',
        component: () => import('@/views/life/wish'),
        name: 'Wish',
        meta: { title: '愿望清单', icon: 'wish' }
      },
      {
        path: 'micro-habit',
        component: () => import('@/views/life/micro-habit'),
        name: 'MicroHabit',
        meta: { title: '微习惯', icon: 'wish' }
      },
      {
        path: 'diary',
        component: () => import('@/views/life/diary'),
        name: 'Diary',
        meta: { title: '日记', icon: 'diary' }
      },
      {
        hidden: true,
        path: 'diary-add',
        component: () => import('@/views/life/diary/add'),
        name: 'DiaryAdd',
        meta: { title: '新增日记' }
      },
      {
        hidden: true,
        path: 'diary-update',
        component: () => import('@/views/life/diary/update'),
        name: 'DiaryUpdate',
        meta: { title: '编辑日记' }
      },
      {
        path: 'note-book',
        component: () => import('@/views/life/note/note-book'),
        name: 'NoteBook',
        meta: { title: '笔记本', icon: 'note-book' }
      },
      {
        hidden: true,
        path: 'note',
        component: () => import('@/views/life/note/note'),
        name: 'Note',
        meta: { title: '笔记', icon: 'note' }
      }

    ]
  }]

}

export default nestedRouter
